<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改课程信息')" />
    <th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-course-edit" th:object="${rmCourse}">
            <input id="cid" th:field="*{cid}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程名称：</label>
                <div class="col-sm-8">
                    <input id="cname" th:field="*{cname}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程状态：</label>
                <div class="col-sm-8">
                    <label class="toggle-switch switch-solid">
                        <input type="checkbox" id="cstatus" th:checked="${rmCourse.cstatus == '0' ? true : false}">
                        <span></span>
                    </label>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程类型：</label>
                <div class="col-sm-8">
                    <select id="ctype" class="form-control m-b" th:with="type=${@dict.getType('rm_course_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{ctype}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">课程描述：</label>
                <div class="col-sm-8">
                    <input id="cdesc" th:field="*{cdesc}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">重传课程图片：</label>
                <div class="col-sm-8">
                    <img   th:src="*{cimg}" width="100" height="100"/>
                    <input id="cimg"   class="form-control" accept=".jpg,.png" type="file">
                </div>
            </div>
            <div class="form-group" id='pathDiv'>
                <label class="col-sm-3 control-label">重传课程视频：</label>
                <div class="col-sm-8">
                    <input id="cpath"   class="form-control" accept=".mp4" type="file">
                </div>
            </div>
            <div class="form-group" id="courText">
                <label class="col-sm-3 control-label">编辑课程内容：</label>
                <!--<div class="col-sm-8">
                    <textarea name="ctext" class="form-control">[[*{ctext}]]</textarea>
                </div>-->

                <div class="row">
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>课程内容</h5>
                            </div>
                            <div class="ibox-content no-padding" id="eg">
                                <div class="summernote" th:utext="*{ctext}">

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script th:src="@{/self/courseedit.js}"></script>
    <script type="text/javascript">

    </script>
</body>
</html>